Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

Addresses unresolved review comments from PR #2 review thread.

Changes

  • Trailing whitespace cleanup: planewave.py, exchange_legendre.py, pyproject.toml
  • Input validation: Added sign_magneticfield validation in get_form_factors() public API
  • Dead code removal: Removed unused Veff = None assignment in exchange_legendre.py
  • Documentation: Fixed grammar in README.md ("wavefunction used to find" → "wavefunction is used to find")
  • Test accuracy: Fixed misleading comment in test_validation.py (tolerance is 3e-3, not 1e-4)
  • Auto-formatting: Import ordering, lru_cache(maxsize=None)cache, removed unnecessary string quotes from type annotations

All 18 tests pass.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…g, grammar, unused variable

Co-authored-by: skilledwolf <18141588+skilledwolf@users.noreply.github.com>
@skilledwolf skilledwolf marked this pull request as ready for review December 3, 2025 19:53
Copilot AI review requested due to automatic review settings December 3, 2025 19:53
Copilot AI changed the title [WIP] Fix sign and indexing issues in quantum Hall matrix elements Address PR review feedback: code style and validation fixes Dec 3, 2025
Copilot AI requested a review from skilledwolf December 3, 2025 19:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request addresses code quality and consistency issues across the quantumhall_matrixelements package. The changes are primarily focused on code cleanup, modernization, and improved validation, with no functional logic changes to the core algorithms.

Key changes:

  • Modernized caching by replacing lru_cache(maxsize=None) with functools.cache (Python 3.9+ feature)
  • Removed unnecessary string quotes from type annotations (leveraging from __future__ import annotations)
  • Added input validation for sign_magneticfield parameter and cleaned up unused variable assignments
  • Fixed code style issues including trailing whitespace, import ordering, and comment accuracy

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_validation.py Updated comment to accurately reflect the 3e-3 tolerance used in assertion; added blank lines for PEP 8 compliance
tests/test_exchange_legendre.py Fixed import statement ordering to follow alphabetical sorting convention
src/quantumhall_matrixelements/planewave.py Removed unnecessary quotes from type annotations; added input validation for sign_magneticfield; removed trailing whitespace
src/quantumhall_matrixelements/exchange_legendre.py Replaced lru_cache with cache decorator; removed unused Veff assignment in Coulomb case; removed trailing whitespace; removed unnecessary quotes from type annotations
src/quantumhall_matrixelements/exchange_hankel.py Replaced lru_cache with cache decorator; removed unnecessary quotes from type annotations
src/quantumhall_matrixelements/diagnostic.py Removed unnecessary quotes from type annotations
src/quantumhall_matrixelements/__init__.py Fixed import ordering (standard library, then local imports); removed unnecessary quotes from type annotations
pyproject.toml Removed trailing whitespace from authors line
README.md Fixed grammar: changed "wavefunction used" to "wavefunction is used"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skilledwolf skilledwolf merged commit 5f98990 into Fixes_B_field Dec 3, 2025
6 checks passed
@skilledwolf skilledwolf deleted the copilot/sub-pr-2 branch December 3, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants